import Layout from '@/layout'

const managerChannelRouter = {
  path: '/manager/channel',
  component: Layout,
  redirect: 'noRedirect',
  alwaysShow: true,
  name: 'ManagerChannel',
  meta: {
    title: '渠道管理',
    roles: ['manager', 'admin']
  },
  children: [
    {
      path: 'supplier',
      component: () => import('@/views/manager/channel/supplier-list'),
      name: 'ManagerChannelSupplier',
      meta: { title: '渠道设置', noCache: false }
    },
    {
      path: 'supplier/:id(\\d+)/edit',
      component: () => import('@/views/manager/channel/supplier-edit'),
      name: 'ManagerChannelSupplierEdit',
      meta: { title: '渠道编辑', noCache: false },
      hidden: true
    },
    {
      path: 'supplier/discount',
      component: () => import('@/views/manager/channel/supplier-discount-list'),
      name: 'ManagerChannelSupplierDiscount',
      meta: { title: '基础销售折扣', noCache: false }
    },
    {
      path: 'supplier/discount/:id(\\d+)/edit',
      component: () => import('@/views/manager/channel/supplier-discount-edit'),
      name: 'ManagerChannelSupplierDiscountEdit',
      meta: { title: '基础折扣编辑', noCache: false },
      hidden: true
    },
    {
      path: 'supplier/sku-discount',
      component: () => import('@/views/manager/channel/supplier-sku-discount-list'),
      name: 'ManagerChannelSupplierSkuDiscount',
      meta: { title: '货号销售折扣', noCache: false }
    },
    {
      path: 'supplier/sku-discount/:id(\\d+)/edit',
      component: () => import('@/views/manager/channel/supplier-sku-discount-edit'),
      name: 'ManagerChannelSupplierSkuDiscountEdit',
      meta: { title: '货号折扣编辑', noCache: false },
      hidden: true
    },
    {
      path: 'supplier/delivery-charge',
      component: () => import('@/views/manager/channel/supplier-delivery-charge-list'),
      name: 'ManagerChannelSupplierDeliveryCharge',
      meta: { title: '渠道邮费', noCache: false },
      hidden: true
    },
    {
      path: 'supplier/delivery-charge/:id(\\d+)/edit',
      component: () => import('@/views/manager/channel/supplier-delivery-charge-edit'),
      name: 'ManagerChannelSupplierDeliveryChargeEdit',
      meta: { title: '邮费编辑', noCache: false },
      hidden: true
    }
  ]
}

export default managerChannelRouter
